#include <stdio.h>
#include <stdlib.h>

#define PRINT_MACRO_HELPER(x) #x
#define PRINT_MACRO(x) #x"="PRINT_MACRO_HELPER(x)

int main(int argc, char* argv[]) {
    printf("1. show git version:\n");
#pragma message(PRINT_MACRO(TIMESTAMP))
#ifdef TIMESTAMP
    char* ptr = TIMESTAMP;
    printf("method 1: %s \n", ptr);
#else
    printf("not define \n");
#endif

    printf("2. show git version:\n");

    FILE * fp;
    char buffer[256];
    fp=popen("./git_commit.sh", "r");
    fgets(buffer,sizeof(buffer),fp);
    printf("method 2: %s", buffer);
    pclose(fp);

    return 0;
}